package softtech.app.secretcaller;

import android.content.ContentValues;

public class DatabaseSMS {
	
	public static final String TABLE_NAME = "t_sms";
	public static final String KEY_PRIMARY = "id";
	public static final String KEY_PHONE ="phone_number";
	public static final String KEY_CONTENT="sms_content";
	public static final String KEY_DATE_TIME = "date_time";
	public static final String KEY_TYPE ="type";
	public static final String KEY_CONTACT_ID = "contact_id";
	
	public static final int SEND = 1;
	public static final int RECEIVE = 2;
			
	private int id;
	private long contact_id;
	private String phone;
	private String content;
	private String date;
	private int type;
	
	public DatabaseSMS(long con_id , String ph , String co ,int type){
		this(-1 , con_id , ph, co , "", type);
	}
	
	public DatabaseSMS(long con_id , String ph , String co ,String dt ,int type){
		this(-1 , con_id , ph, co , dt, type);
	}
	
	public DatabaseSMS(int _id , long con_id , String ph , String co , String dt ,int type){
		id = _id;
		contact_id = con_id;
		phone = ph;
		content = co;
		date = dt;
		this.type =type;  
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
	
	public long getContact_id() {
		return contact_id;
	}

	public void setContact_id(int contact_id) {
		this.contact_id = contact_id;
	}

	public ContentValues toContentValues(){
		ContentValues values = new ContentValues();
		values.put(KEY_CONTACT_ID, contact_id);
		values.put(KEY_CONTENT, content);
		values.put(KEY_PHONE, phone);
		values.put(KEY_TYPE, type);
		values.put(KEY_DATE_TIME, date);
		return values;
	}
	
}
